package com.prototype.protoType;

import java.util.Scanner;

/**
 * @author Vhong
 * @version 1.0
 * 圆形类
 */
public class Circle implements Shape {

    @Override
    public Object clone() {
        Circle w = null;
        try {
            w = (Circle) super.clone();
        } catch (CloneNotSupportedException e) {
            System.out.println("复制圆失败");
        }
        return w;
    }

    @Override
    public void countArea() {
        int r = 0;
        System.out.println("这是一个圆：请输入圆的半径：");
        Scanner s = new Scanner(System.in);
        int i = s.nextInt();
        System.out.println("圆的面积为：" + i * i * 3.14 + "\n");
    }
}
